//
//  EastViewController.m
//  Astro
//
//  Created by ACER on 11/29/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import "EastViewController.h"
#import "DayViewController.h"
#import "CompareAgesViewController.h"
#import "CommentaryViewController.h"

@implementation EastViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle


- (void)viewDidLoad {
    [super viewDidLoad];
	self.title = @"East";		
    
	AstroAppDelegate *appDelegate = APP_DELEGATE;
	self.navigationItem.rightBarButtonItem = appDelegate.mainButtonItem;
	appDelegate = nil;
}

- (void) action{
	NSLog(@"abcxyz");
}

- (void) viewWillAppear:(BOOL)animated{
	[self.navigationController setNavigationBarHidden:NO animated:YES];
	AstroAppDelegate *appDelegate = APP_DELEGATE;
	[appDelegate bottomButtonControlWithState:BBStateShowAbout andType:BBTypeEast];
	appDelegate = nil;
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

//======================================
- (IBAction)clcikCointBtn {


}

- (IBAction)clickDateBtn {
    DayViewController *viewDay = [[DayViewController alloc] initWithNibName:@"DayViewController" bundle:nil];
    [self.navigationController pushViewController:viewDay animated:YES];
}

- (IBAction)clickCompareAgeBtn {
    CompareAgesViewController *viewCompareAges = [[CompareAgesViewController alloc] initWithNibName:@"CompareAgesViewController" bundle:nil];
    [self.navigationController pushViewController:viewCompareAges animated:YES];
}

- (IBAction)clickCommentaryBtn {
    CommentaryViewController *viewCommentary = [[CommentaryViewController alloc] initWithNibName:@"CommentaryViewController" bundle:nil];
    [self.navigationController pushViewController:viewCommentary animated:YES];
}


@end
